package faw.car.ccentersdk.data;

import android.os.Parcel;
import android.os.Parcelable;

public class WindowState implements Parcelable {
    private int sourceID;
    private int taskID;
    /**
     * 四个窗户的指令
     * * BO_WinCtrlCmd_enum_WinCtrlCmdInactive = 0U, 无效
     * * BO_WinCtrlCmd_enum_WinCtrlCmdOpen = 1U, 打开
     * * BO_WinCtrlCmd_enum_WinCtrlCmdClose = 2U, 关闭
     * * BO_WinCtrlCmd_enum_WinCtrlCmdStop = 3U, 停止
     * * BO_WinCtrlCmd_enum_WinCtrlCmdPos = 4U 移动到固定位置
     */
    private int FLWinCtrlCmd;
    private int FRWinCtrlCmd;
    private int RLWinCtrlCmd;
    private int RRWinCtrlCmd;

    /**
     * 四个窗户的开度[0;100]
     */
    private int FLWinPercent;
    private int FRWinPercent;
    private int RLWinPercent;
    private int RRWinPercent;

    public int getSourceID() {
        return sourceID;
    }

    public void setSourceID(int sourceID) {
        this.sourceID = sourceID;
    }

    public int getTaskID() {
        return taskID;
    }

    public void setTaskID(int taskID) {
        this.taskID = taskID;
    }

    public void setFLWinCtrlCmd(int flWinCtrlCmd) {
        this.FLWinCtrlCmd = flWinCtrlCmd;
    }

    public int getFLWinCtrlCmd() {
        return this.FLWinCtrlCmd;
    }

    public void setFRWinCtrlCmd(int frWinCtrlCmd) {
        this.FRWinCtrlCmd = frWinCtrlCmd;
    }

    public int getFRWinCtrlCmd() {
        return this.FRWinCtrlCmd;
    }

    public void setRLWinCtrlCmd(int rlWinCtrlCmd) {
        this.RLWinCtrlCmd = rlWinCtrlCmd;
    }

    public int getRLWinCtrlCmd() {
        return this.RLWinCtrlCmd;
    }

    public void setRRWinCtrlCmd(int rrWinCtrlCmd) {
        this.RRWinCtrlCmd = rrWinCtrlCmd;
    }

    public int getRRWinCtrlCmd() {
        return this.RRWinCtrlCmd;
    }

    public void setFLWinPercent(int flWinPercent) {
        this.FLWinPercent = flWinPercent;
    }

    public int getFLWinPercent() {
        return this.FLWinPercent;
    }

    public void setFRWinPercent(int frWinPercent) {
        this.FRWinPercent = frWinPercent;
    }

    public int getFRWinPercent() {
        return this.FRWinPercent;
    }

    public void setRLWinPercent(int rlWinPercent) {
        this.RLWinPercent = rlWinPercent;
    }

    public int getRLWinPercent() {
        return this.RLWinPercent;
    }

    public void setRRWinPercent(int rrWinPercent) {
        this.RRWinPercent = rrWinPercent;
    }

    public int getRRWinPercent() {
        return this.RRWinPercent;
    }

    public WindowState() {

    }

    protected WindowState(Parcel in) {
        sourceID = in.readInt();
        taskID = in.readInt();
        FLWinCtrlCmd = in.readInt();
        FRWinCtrlCmd = in.readInt();
        RLWinCtrlCmd = in.readInt();
        RRWinCtrlCmd = in.readInt();
        FLWinPercent = in.readInt();
        FRWinPercent = in.readInt();
        RLWinPercent = in.readInt();
        RRWinPercent = in.readInt();
    }

    public static final Creator<WindowState> CREATOR = new Creator<WindowState>() {
        @Override
        public WindowState createFromParcel(Parcel in) {
            return new WindowState(in);
        }

        @Override
        public WindowState[] newArray(int size) {
            return new WindowState[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(sourceID);
        dest.writeInt(taskID);
        dest.writeInt(FLWinCtrlCmd);
        dest.writeInt(FRWinCtrlCmd);
        dest.writeInt(RLWinCtrlCmd);
        dest.writeInt(RRWinCtrlCmd);
        dest.writeInt(FLWinPercent);
        dest.writeInt(FRWinPercent);
        dest.writeInt(RLWinPercent);
        dest.writeInt(RRWinPercent);
    }

    @Override
    public String toString() {
        return "WindowState{" +
                "sourceID=" + sourceID +
                "taskID=" + taskID +
                ", FLWinCtrlCmd=" + FLWinCtrlCmd +
                ", FRWinCtrlCmd=" + FRWinCtrlCmd +
                ", RLWinCtrlCmd=" + RLWinCtrlCmd +
                ", RRWinCtrlCmd=" + RRWinCtrlCmd +
                ", FLWinPercent=" + FLWinPercent +
                ", FRWinPercent=" + FRWinPercent +
                ", RLWinPercent=" + RLWinPercent +
                ", RRWinPercent=" + RRWinPercent +
                '}';
    }
}
